package com.hit.demo1.mapper;

import com.hit.demo1.entity.E_Stu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *  数据层控制
 */
@Repository
public interface StrMapper extends JpaRepository<E_Stu, Integer>, JpaSpecificationExecutor<E_Stu> {
    /**
     * 查询班级
     * @param sclass
     * @return
     */
    List<E_Stu> findAllBySclass(String sclass);

    /**
     * 查询班级与地址
     * @param saddress
     * @param sclass
     * @return
     */
    List<E_Stu> findAllBySaddressAndSclassOrderBySid(String saddress, String sclass);

    /**
     * like查询
     * @param sclass
     * @return
     */
    List<E_Stu> findAllBySclassLike(String sclass);


}
